import Vue from 'vue'
import App from './App.vue'
import router from './router'
import {utils,host} from './utils'
import moment from 'moment'
import store from './store'
// element-ui 开始
import {
  Menu,
  Loading,
  MessageBox,
  Message,
  Submenu,
  MenuItem,
  MenuItemGroup,
  Input,
  InputNumber,
  Radio,
  RadioGroup,
  RadioButton,
  Checkbox,
  CheckboxButton,
  CheckboxGroup,
  Switch,
  Select,
  Option,
  OptionGroup,
  Button,
  ButtonGroup,
  Table,
  TableColumn,
  Form,
  FormItem,
  Container,
  Header,
  Aside,
  Main,
  Footer,
  Row,
  Tree,
  Dialog,
  Collapse,
  CollapseItem,
  Cascader,
  Pagination,
  Upload,
  Popover,
  Avatar,
  Image,
  TimePicker,
  TimeSelect,
  Carousel,
  CarouselItem,
  Card,
  Col,
  Dropdown,
  DropdownItem,
  DropdownMenu,
  DatePicker,
  Descriptions,
  DescriptionsItem, Tag, Steps, Step, Tabs, TabPane
} from 'element-ui';
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(MenuItemGroup)
Vue.use(Input)
Vue.use(InputNumber)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(RadioButton)
Vue.use(Checkbox)
Vue.use(CheckboxButton)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
Vue.use(Option)
Vue.use(OptionGroup)
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Container)
Vue.use(Header)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Footer)
Vue.use(Row)
Vue.use(Col)
Vue.use(Tree)
Vue.use(Dialog)
Vue.use(Collapse)
Vue.use(CollapseItem)
Vue.use(Cascader)
Vue.use(Pagination)
Vue.use(Upload)
Vue.use(Popover)
Vue.use(Avatar)
Vue.use(Image)
Vue.use(TimePicker)
Vue.use(TimeSelect)
Vue.use(Carousel)
Vue.use(CarouselItem)
Vue.use(Card)
Vue.use(Dropdown)
Vue.use(DropdownItem)
Vue.use(DropdownMenu)
Vue.use(DatePicker)
Vue.use(Descriptions)
Vue.use(DescriptionsItem)
Vue.use(Tag)
Vue.use(Steps)
Vue.use(Step)
Vue.use(Tabs)
Vue.use(Loading)
Vue.use(TabPane)
Vue.prototype.$message = Message;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$loading = Loading.service;
// element-ui end!
// 按需引入echarts start
import * as echarts from "echarts/core";
import { LineChart, BarChart } from "echarts/charts";
import {
  TitleComponent,
  LegendComponent,
  TooltipComponent,
  GridComponent,
  DatasetComponent,
  TransformComponent,
  ToolboxComponent,
} from "echarts/components";
import { LabelLayout, UniversalTransition } from "echarts/features";
import { CanvasRenderer } from "echarts/renderers";
echarts.use([
  TitleComponent,
  LegendComponent,
  TooltipComponent,
  GridComponent,
  DatasetComponent,
  TransformComponent,
  LabelLayout,
  UniversalTransition,
  CanvasRenderer,
  LineChart,
  BarChart,
  ToolboxComponent
]);
Vue.prototype.$echarts = echarts
// echarts end!
Vue.prototype.$utils = utils
Vue.prototype.$config = host
Vue.prototype.$moment = moment
Vue.config.productionTip = false
// css start
import 'element-ui/lib/theme-chalk/index.css';
import "./assets/iconfont/iconfont.css";
import './assets/styles/commons.css';
// css end!

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
